<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->

<head>
<meta charset="utf-8">
<title>SMM撮合系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css"
	rel="stylesheet" type="text/css">

<link
	href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css"
	id="style_components" rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/plugins.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/layout.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css"
	rel="stylesheet" type="text/css" id="style_color">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/custom.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css"
	href="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.css" />
<link
	href="${request.getContextPath()}/Public/assets/admin/css/common.css"
	rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/css/customerDetail.css"
	rel="stylesheet" type="text/css">
<link rel="shortcut icon"
	href="${request.getContextPath()}/Public/favicon.ico">
<script>
	BASE_URL = '${request.getContextPath()}'
</script>
<style type="text/css">
.datepicker {
	font-size: 16px;
}

.datepicker td, .datepicker th {
	width: 14.28571428571429%;
	height: 40px;
}

.table-condensed {
	width: 100%;
}

.datepicker-inline {
	width: 100%;
}

table.ttTbl tbody tr td {
	white-space: nowrap;
}
</style>

</head>

<body class="page-header-top-fixed">
	<!--头部信息结束 -->
	<div class="page-header">
		<!--头部开始-->
		<#include "/include/top.html" />
		<!-- 头部信息结束 -->


		<!-- 头部菜单开始 -->
		<#include "/include/top_menu.html" />
		<!-- 头部菜单结束 -->
	</div>
	<!-- END HEADER -->


	<!-- BEGIN PAGE CONTAINER -->
	<div class="page-container">
		<!-- BEGIN PAGE HEAD -->
		<div class="page-head">
			<div class="container-fluid">
				<div class="page-toolbar" style="margin-right: 70px;">
					<div class="btn-group btn-theme-panel">
						<a href="javascript:;" class="btn dropdown-toggle"
							data-toggle="dropdown"> <i class="icon-settings"><span
								style="font-size: 18px; color: #000;">&nbsp;添加组件</span></i>
						</a>
						<div
							class="dropdown-menu theme-panel pull-center dropdown-custom hold-on-click">
							<ul class="theme-colors">
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','1');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">最近走势</span></li>
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','2');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">最新客户</span></li>
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','3');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">最新报盘</span></li>
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','4');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">最新买盘</span></li>
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','5');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">个人便签</span></li>
								<li class="theme-color theme-color-default"
									onclick="addOrdelWebparts('0','6');"><span
									class="badge badge-default">+</span> <span
									class="theme-color-name">推荐采购商</span></li>
							</ul>

							<input type="hidden" value="${webParts}" id="webParts">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- END PAGE HEAD -->
		<!-- 首页内容开始 -->
		<div class="page-content">
			<div class="container-fluid">
				<!-- 当前位置提示开始 -->
				<ul class="page-breadcrumb breadcrumb">
					<li>当前位置<i class="fa fa-circle"></i>
					</li>
					<li class="active"><a href="#">首页</a></li>
				</ul>
				<!-- 当前位置提示结束 -->
				<!-- 各个组件开始-->
				<div class="col-md-6  margin-top-10">
					<!--日期控件-->
					<div class="date-picker" id="date-picker"
						data-date-format="yyyy-MM-dd" data-date-viewmode="years"
						data-date="2015/1/1"></div>
					<!--日期控件结束-->
					<div id="recordRight">
						<div class="portlet" id="indexContent">
							<div class="portlet-title " id="indexTitle">
								<div class="caption">
									<i class="fa fa-cogs font-green-sharp"></i> <span
										class="caption-subject font-green-sharp bold uppercase">记录
									</span>
								</div>
								<!--  	<div class="tools">
								<a href="javascript:;" class="fullscreen" data-original-title="全屏" title="全屏"></a>
							</div>
							-->
							</div>
							<div class="portlet-body" id="recordContent"
								style="height: 259px;">
								<textarea class="form-control" rows="13"
									style="height: 99.99999%" id="notes"></textarea>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-6  margin-top-10" id="recentlyTrend"
					style="display: none;">
					<!-- BEGIN PORTLET-->
					<div class="portlet light bordered">
						<div class="portlet-title">
							<div class="caption">
								<i class="fa fa-cogs font-green-sharp"></i> <span
									class="caption-subject font-green-sharp bold uppercase">最近走势</span>
								&nbsp;
								<a class="caption-subject font-green-sharp bold uppercase" onclick="toysId();">切换样式</a>
								<input type="hidden" id="ysId" value="0">
							</div>
							<div class="tools">
								<a href="javascript:;" class="fullscreen"
									data-original-title="全屏" title="全屏"></a> <a href="javascript:;"
									class="remove" data-original-title="移除" title="移除"
									onclick="addOrdelWebparts('1','1');"> </a>
							</div>
						</div>
						<div class="portlet-body" style="height: 245px;">
							<div id="container1" style="height: 240px; margin: 0 auto"></div>
						</div>
					</div>
					<!-- END PORTLET-->
				</div>
				<!--第一行组件结束  -->
				<!-- 第二行组件开始 -->
				<div class="col-md-6 " id="customer" style="display: none;">
					<div class="portlet light bordered" style="height: 445px;">
						<div class="portlet-title ">
							<div class="caption">
								<i class="fa fa-cogs font-green-sharp"></i> <span
									class="caption-subject font-green-sharp bold uppercase ">最新加入公司客户</span>
							</div>
							<div class="tools">
								<a href="javascript:;" class="fullscreen"
									data-original-title="全屏" title="全屏"></a> <a href="javascript:;"
									class="remove" data-original-title="移除" title="移除"
									onclick="addOrdelWebparts('1','2');"> </a>
							</div>
						</div>
						<div class="portlet-body">
							<div class="table-scrollable">
								<table
									class="table table-striped table-bordered table-advance table-hover ttTbl">
									<thead>
										<tr>
											<th>#</th>
											<th>公司名称</th>
											<th>企业类型</th>
											<th>年销售额</th>
											<th>采购品牌</th>
											<th>负责人</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="customs">
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-6 " id="sellPool" style="display: none;">
					<!-- BEGIN PORTLET-->
					<div class="portlet light bordered" style="height: 445px;">
						<div class="portlet-title ">
							<div class="caption">
								<i class="fa fa-cogs font-green-sharp"></i> <span
									class="caption-subject font-green-sharp bold uppercase">最新报盘</span>
							</div>
							<div class="tools">
								<a href="javascript:;" class="fullscreen"
									data-original-title="全屏" title="全屏"></a> <a href="javascript:;"
									class="remove" data-original-title="移除" title="移除"
									onclick="addOrdelWebparts('1','3');"> </a>
							</div>
						</div>
						<div class="portlet-body">
							<div class="table-scrollable">
								<table
									class="table table-striped table-bordered table-advance table-hover ttTbl">
									<thead>
										<tr>
											<th>#</th>
											<th id="lastBrand">产品</th>
											<th>价格</th>
											<th>库存</th>
											<th>仓库</th>
											<th>公司</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="contextList">
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
				<!-- 第二行组件结束 -->
				<div class="col-md-6 " id="buyPool" style="display: none;">
					<!-- BEGIN REGIONAL STATS PORTLET-->
					<div class="portlet light bordered" style="height: 445px;">
						<div class="portlet-title">
							<div class="caption caption-md">
								<i class="fa fa-cogs font-green-sharp"></i> <span
									class="caption-subject theme-font bold uppercase">最新买盘</span>
							</div>
							<div class="tools">
								<a href="javascript:;" class="fullscreen"
									data-original-title="全屏" title="全屏"></a> <a href="javascript:;"
									class="remove" data-original-title="移除" title="移除"
									onclick="addOrdelWebparts('1','4');"> </a>
							</div>
						</div>
						<div class="portlet-body">
							<div id="region_statistics_content"></div>
						</div>
					</div>
					<!-- END REGIONAL STATS PORTLET-->
				</div>
				<div class="col-md-6 " id="notesByMe" style="display: none;">
					<!-- BEGIN PORTLET-->
					<div class="portlet light bordered" style="height: 445px;">
						<div class="portlet-title">
							<div class="caption">
								<i class="fa fa-cogs font-green-sharp"></i> <span
									class="caption-subject font-green-sharp bold uppercase">个人便签</span>
							</div>
							<div class="tools">
								<a href="javascript:;" class="fullscreen"
									data-original-title="全屏" title="全屏"></a> <a href="javascript:;"
									class="myRemove" data-original-title="移除" title="移除"
									onclick="addOrdelWebparts('1','5');"> </a>
							</div>
						</div>
						<div class="portlet-body">
							<textarea class="form-control" rows="17" style="height: 98%"
								id="myNotes"></textarea>
							<input type="hidden" id="myNotesId">
						</div>
					</div>
					</div>
					<!-- END PORTLET-->
					<div class="col-md-6 " id="remindCustom" style="display: none;">
						<div class="portlet light bordered" style="height: 445px;">
							<div class="portlet-title ">
								<div class="caption">
									<i class="fa fa-cogs font-green-sharp"></i> <span
										class="caption-subject font-green-sharp bold uppercase ">推荐采购商</span>
								</div>
								<div class="tools">
									<a href="javascript:;" class="fullscreen"
										data-original-title="全屏" title="全屏"></a> <a
										href="javascript:;" class="remove" data-original-title="移除"
										title="移除" onclick="addOrdelWebparts('1','6');"> </a>
								</div>
							</div>
							<div class="portlet-body">
								<div class="table-scrollable">
									<table
										class="table table-striped table-bordered table-advance table-hover ttTbl">
										<thead>
											<tr>
											<tr>
												<th>公司名称</th>
												<th>采购周期</th>
												<th>年销售额</th>
												<th>采购品牌</th>
												<th>操作</th>
												<th>负责人</th>
											</tr>
											</tr>
										</thead>
										<tbody id="remindCustomList">
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
					<!-- END PAGE CONTENT INNER -->
				</div>
			</div>
			<!-- END PAGE CONTENT -->
		
		<!-- END PAGE CONTAINER -->

		<!-- 底部开始 -->
		<#include "/include/foot.html" />
		<!-- 底部结束 -->

		<!--[if lt IE 9]>
<script src="${request.getContextPath()}/Public/assets/global/plugins/respond.min.js"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/excanvas.min.js"></script>
<![endif]-->
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/jquery.sparkline.min.js"
			type="text/javascript"></script>

		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker-index.js"
			type="text/javascript"></script>

		<script
			src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/admin/scripts/indexComponent.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js"
			type="text/javascript"></script>
		<script
			src="${request.getContextPath()}/Public/assets/global/plugins/highcharts.js"
			type="text/javascript"></script>
			
			<script type="text/javascript" src="${request.getContextPath()}/Public/My97DatePicker/WdatePicker.js"></script>
			
		<script>
			jQuery(document).ready(
					function() {

						Metronic.init(); // init metronic core componets
						Layout.init(); // init layout
						IndexComponent.init(); // init index component

						//		获取当前日期
						var now_date = new Date().toLocaleDateString();

						//		设置日期控件当前日期
						$("#date-picker").data("date", now_date);

						var CREATE_DATE_ARRAY = new Array();

						//延迟加载日期控件
						setTimeout(function() {

							//绑定日期控件的click事件，每次点击后都重新标定有日记的日期
							$("#date-picker").datepicker().on('click',
									function(event) {

										showDateArray(CREATE_DATE_ARRAY);
									});

							//获取日期列表
							$.get(BASE_URL + "/notes/createDatesByUser.do",
									function(data) {

										CREATE_DATE_ARRAY = data.dates;

										//有记录的日期用不同颜色标注
										showDateArray(CREATE_DATE_ARRAY);

									}, "json");

						}, 100);
					});

			function showDateArray(dates) {

				if (!dates || dates.length < 1)
					return false;

				var date_td = $(".datepicker-days td");

				//获取日期控件上的当前年份
				var picker_date = $(".datepicker-switch").html();

				var now_year = picker_date.substr(3, 9);//new Date().getFullYear();

				//获取日期控件上的当前月份
				var now_month = picker_date.substr(0, 1);//new Date().getMonth()+1;

				//将中文数字转换为阿拉伯数字
				now_month = changeNumber(now_month);

				for (var i = 0; i < date_td.length; i++) {

					var td = date_td[i];

					var day = $(td).html();

					var td_class = $(td).attr("class");

					//组合日期 如果 class==old day ，是上个月的日期，如果 class == new day 是下个月的日期
					var full_day = "";
					//如果是上个月的日期
					if (td_class == "old day") {

						var month = now_month - 1;

						var year = now_year;

						if (month == 0) {

							month = 12;

							year = now_year - 1;
						}

						full_day = year + "/" + month + "/" + day;

					}

					//			如果是下个月的日期
					if (td_class == "new day") {

						var month = now_month + 1;

						var year = now_year;

						if (month == 13) {

							month = 1;

							year = now_year + 1;
						}

						full_day = year + "/" + month + "/" + day;

					}

					//如果是当前月份的日期
					if (td_class == "day" || td_class == "active day") {

						full_day = now_year + "/" + now_month + "/" + day;
					}

					//			如果该日期在日期列表中,设置选中css
					for (var j = 0; j < dates.length; j++) {
						if (dates[j] == full_day) {
							$(td).addClass("day_has_record");
						}
					}

				}
			}

			function changeNumber(num) {
				var c = new Array("一", "二", "三", "四", "五", "六", "七", "八", "九",
						"十", "十一", "十二");

				var a = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
				for (var i = 0; i < c.length; i++) {
					if (c[i] == num) {
						return a[i];
					}
				}
				return -1;
			}
	
	function toysId(){
		var ysId = $("#ysId").val();
		if(ysId=="0"){
			$("#ysId").val("1");
		}else{
			$("#ysId").val("0");
		}
		IndexComponent.callRecentlyTrend();
	}
	

		</script>
		<style type="text/css">
.day_has_record {
	background-color: #87CEFA
}
</style>
</body>
</html>